<template>
	<view class="flex flex-col">
		<view class="text-2xl u-text-center">
			<text class="">请扫码获取</text>
		</view> 
		<view class="flex justify-center">
			<image style="width: 200px; height: 200px; background-color: #eeeeee;" mode="scaleToFill"
			:src='voucherUrl'></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				voucherUrl: '',
				id: ''
			}
		},
		onLoad(uuid) {
			this.id = uuid
		},
		async created() {
			const url = await this.api.post(`trade/voucher/${this.id.uuid}/showQr`)
			this.voucherUrl=url.replace(/[\r\n]/g,"")
		},
		methods: {}
	}
</script>

<style scoped lang="scss">

</style>
